#ifndef _GAME_STATE_H
#define _GAME_STATE_H

#include "common\GLApp.h"

class StateManager;

class GameState
{
public:
  GameState(StateManager* stateManager);
  virtual void draw() {}
  virtual APP_MSG update(DWORD milliseconds, Keys* keys, Mouse* mouse) {return MSG_NONE;}
  virtual void enterState() {}
  virtual void exitState() {}
protected:
  void changeState(GameState* state);
  StateManager* m_stateManager;
};


class StateManager
{
public:
  StateManager();
  ~StateManager();
  void changeState(GameState* state);
  GameState* getActiveState();
  void draw();
  APP_MSG update(DWORD milliseconds, Keys* keys, Mouse* mouse);
private:
  GameState* m_activeState;
};

#endif